/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package my.simpleinsulinpump;
import javax.swing.JLabel;
import javax.swing.Timer;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.util.Date;
/**
 *
 * @author arianareyessantiago
 */

  public class ClockLabel extends JLabel implements ActionListener {
private static int batteryLife = 100;
  public ClockLabel() {
    super("" + new Date());
    Timer t = new Timer(1000, this);
    t.start();
  
    
   
  }

  public void actionPerformed(ActionEvent ae) {
    setText((new Date()).toString());
  }
}


